﻿using System;
using System.Collections.Generic;
using System.Text;

namespace _03简单工厂
{

    public  class MouseFachtory
   {
        private Mouse mouse = null;
        public Mouse CreateMouse(string brand)
        {
          
            switch (brand)
            {
                case "dell":
                    mouse=new DellMouse();
                    break;
                case "hp":
                    mouse = new HPMouse();
                    break;
                case "lenovo":
                    mouse = new LenovoMouse();
                    break;
                default:
                    break;
            }
            return mouse;
        }
   }
}
